import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import index from '@/components/index'
import user from '@/components/user'
import supplier from '@/components/supplier'
import bill from '@/components/bill'
import changePassword from '@/components/changePassword'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      meta: {
        title: '首页'
      },
      children:[
        {
          path: '/user',
          name: 'user',
          component: user,
        },
        {
          path: '/supplier',
          name: 'supplier',
          component: supplier,
        },
        {
          path: '/bill',
          name: 'bill',
          component: bill,
        },
        {
          path: '/changePassword',
          name: 'changePassword',
          component: changePassword,
        },
      ]
    },

  ]
})
